<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<SCript src="./js/vue.js"></SCript>

<body>
    <div id="app">
        <table border="100%" cellspacing="0" width="100%">
            <tr>
                <th>编号</th>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>成绩</th>
                <th>等级</th>
            </tr>
            <tr v-for="(item,index) in users">
                <td>{{index+1}}</td>
                <td>{{item.name}}</td>
                <td>{{item.age}}</td>
                <td>{{item.gender==1?"男":"女"}}</td>
                <td>{{item.score}}</td>
                <td>
                    <span v-show="item.score>=85&&item.score<=100">优秀</span>
                    <span v-show="item.score>=60&&item.score<=84">及格</span>
                    <span style="color: brown;" v-show="item.score>=0&&item.score<=59">不合格</span>
                    <span style="color: brown;" v-show="item.score<0||item.score>100">数据错误</span>

                </td>
            </tr>
        </table>


        
    </div>

</body>
<script>
    new Vue({
        el: "#app",
        data: {
            users: [{
                    name: "Tom",
                    age: 20,
                    gender: 1,
                    score: 78,
                },
                {
                    name: "Rose",
                    age: 18,
                    gender: 2,
                    score: 86,
                },
                {
                    name: "Jerry",
                    age: 26,
                    gender: 1,
                    score: 90,
                },
                {
                    name: "Tony",
                    age: 30,
                    gender: 1,
                    score: 52,
                },
            ],
        },
    })
</script>

</html>